<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head></h:head>
<h:body>
	<rich:panel>
		<f:facet name="header">
			<h:outputText value="Product"></h:outputText>
		</f:facet>
		<h:form>
			<rich:dataGrid value="#{productPagesController.productList}"
				var="listItem" columns="3" width="600px" border="0">
				<rich:panel>
					<f:facet name="header">
                        Product Grid
                    </f:facet>
					<h:panelGrid columns="2">
						ID:
						<h:outputText value="#{listItem.id}" />
						Name:
						<h:outputText value="#{listItem.name}" />
						Description:
						<h:outputText value="#{listItem.description}" />
						Status
						<h:outputText value="#{listItem.status}" />
						<h:commandLink
							action="#{productPagesController.deleteProduct()}"
							value="Delete">
							<f:param name="id" value="#{listItem.id}"></f:param>
						</h:commandLink>
						<h:commandLink
							action="#{productPagesController.getProductDetail()}"
							value="Details">
							<f:param name="id" value="#{listItem.id}"></f:param>
						</h:commandLink>
						<h:commandLink
							action="#{productPagesController.toUpdateProduct()}"
							value="Update">
							<f:param name="id" value="#{listItem.id}"></f:param>
						</h:commandLink>
					</h:panelGrid>
				</rich:panel>
			</rich:dataGrid>
			<h:commandLink value="Add New...."
				action="#{productPagesController.toAddNewProduct()}" />

		</h:form>
	</rich:panel>
</h:body>
</html>
